#ifndef _TREE_COMMON_H_
#define _TREE_COMMON_H_

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

#define xlog(...) printf(__VA_ARGS__)

#define xerr(...) fprintf(stderr, __VA_ARGS__)

#define _tag_ xerr("%s[%d]\n", __FUNCTION__, __LINE__);

typedef uint8_t boolean;
#define FALSE 0
#define TRUE 1

enum
{
	TREE_MAX_DEPTH	= 64,

	NODE_STACK_LEN	= 64,
};

enum
{
	SUCCESS			= 0,
	ERR_NONE		= 0,

	ERR_COMMON		,

	ERR_NO_MEM		,

	ERR_NOT_IMPL	,

	ERR_NULL_TREE	,

	ERR_TOO_DEEP,
	ERR_STACK		,

	ERR_EXPRESS		,
};

#endif /* _TREE_COMMON_H_ */


